home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 39
/
Amiga Format CD39 (1999-04-13)(Future Publishing)(GB)[!][issue 1999-05].iso
/
-seriously_amiga-
/
wb
/
selector
/
tools
/
docs
/
executehack.readme
< prev
next >
Wrap
Text File
|
1999-03-02
|
2KB
|
78 lines
Short: V1.6 Hack to make Execute recognize #!
Type: util/cli
Uploader: pueschel@imsdd.meb.uni-bonn.de
Author: pueschel@imsdd.meb.uni-bonn.de
The Execute Hack:
This is a little hack that makes the execute command recognize
the #! convention in script files. This means: if a script file
starts with, say "#!/bin/sh", as the first line, my Execute
will run sh as an interpreter on the file. All you have to do
is set the s-flag on the script, and it can be used like other
Amiga-OS scripts.
Installation:
Rename c:Execute to C:Execute.orig (it is called by my Execute for
amiga shell scripts).
Copy my Execute to c: (it can be made resident, like the original).
That's all :-)
Use:
Set the s-flag on all sh, csh, perl or whatever-you-use scripts.
From version 1.4 on, the path after the #! will be used to find
the script interpreter. If the interpreter is not found that way,
the AmigaOS path will be searched for the interpreter.
A resident version of the interpreter will be used if present; remember
however that it might differ from the one pointed to by the #! line.
UNIX style paths will be autoconverted, e.g.:
#!/usr/bin/perl
and
#!usr:bin/perl
are equivalent.
The complete invocation (e.g. perl -i blabla) is set as CLI command
name.
Problems & History:
The original Execute apparently does not use ReadArgs(), so my Execute
does not react exactly the same way when an error occurs.
The first release did not search for scripts, like the original Execute
does. Fixed.
The last component of the search path was ignored. Fixed. Thanks to Gunther
Nikl for the report.
AmigaDOS style paths in the #! line, like #!bin:sh, did not work. Fixed.
Spaces between #! and interpreter name were not properly ignored. Fixed.
The path after #! was ignored. Changed.
The resident list was not really searched. Fixed.
Oops. Version 43.5 only worked with resident Execute.orig. Fixed.
Thanks to Bert Vortman for the report.
OOPS ! Version 43.6 had the same problem with rx ! Path search reinstated
due to popular demand.
Legal Stuff:
There is no warranty. The program is Freeware.
Bug reports & suggestions:
Send bug reports & suggestions to pueschel@imsdd.meb.uni-bonn.de.